package com.zcsy.manage.service.base.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zcsy.manage.model.base.CommonImg;
import com.zcsy.manage.persistence.base.CommonImgDao;
import com.zcsy.manage.service.base.ICommonImgService;

@Service
public class CommonImgServiceImpl implements ICommonImgService {

	@Autowired
	private CommonImgDao commonImgDao;
	
	@Override
	public int insert(CommonImg record) {
		return commonImgDao.insert(record);
	}

	@Override
	public List<CommonImg> selectImgsByObjIdAndObjType(String objId,
			int objType) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("objId", objId);
		map.put("objType", objType);
		return commonImgDao.selectImgsByObjIdAndObjType(map);
	}

	@Override
	public int deleteById(String id) {
		return commonImgDao.deleteById(id);
	}

}
